import React, {Component} from 'react';
import {Provider} from 'react-redux';
import configureStore from './store/configureStore';
import AppWithNavigationState from './AppWithNavigationState';
import CodePush from "react-native-code-push";
import rootSaga from "./sagas/index";

const store = configureStore();
store.runSaga(rootSaga);
// YellowBox.ignoreWarnings(['Warning: isMounted(...) is deprecated', 'Module RCTImageLoader']);
// global.globalMyPoems=[];
class Root extends Component {

    render() {
        return (
            <Provider store={store}>
                <AppWithNavigationState/>
            </Provider>
        );
    }
}

let codePushOptions = { checkFrequency: CodePush.CheckFrequency.MANUAL };

Root = CodePush(codePushOptions)(Root);

export default Root